Delete unused BasicComboBox component
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Thu, 28 Nov 2024 16:57:19 +0000 (00:57 +0800)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 10 Jan 2025 17:29:50 +0000 (18:29 +0100)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
resources.qrc
src/gui/BasicComboBox.qml [deleted file]

index 9d1da12609314f7c6298f7524b0cc85d2ca6ed49..19994e2962f1fe9d66de9e1a6b4172896845c800 100644 (file)
@@ -5,7 +5,6 @@
         <file>src/gui/EmojiPicker.qml</file>
         <file>src/gui/UserStatusSelectorButton.qml</file>
         <file>src/gui/PredefinedStatusButton.qml</file>
-        <file>src/gui/BasicComboBox.qml</file>
         <file>src/gui/ErrorBox.qml</file>
         <file>src/gui/filedetails/FileActivityView.qml</file>
         <file>src/gui/filedetails/FileDetailsPage.qml</file>
diff --git a/src/gui/BasicComboBox.qml b/src/gui/BasicComboBox.qml
deleted file mode 100644 (file)
index a890ade..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2022 by Claudio Cambra <claudio.cambra@nextcloud.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- */
-
-import QtQuick
-import QtQuick.Layouts
-import QtQuick.Controls
-import Qt5Compat.GraphicalEffects
-
-import Style
-import "./tray"
-
-ComboBox {
-    id: clearComboBox
-
-    topPadding: Style.smallSpacing + topInset
-    leftPadding: Style.smallSpacing + leftInset
-    rightPadding: Style.smallSpacing + rightInset
-    bottomPadding: Style.smallSpacing + bottomInset
-
-    background: Rectangle {
-        radius: Style.slightlyRoundedButtonRadius
-        color: palette.button
-        opacity: clearComboBox.hovered ? Style.hoverOpacity : 1.0
-    }
-
-    contentItem: EnforcedPlainTextLabel {
-        leftPadding: clearComboBox.leftPadding
-        rightPadding: clearComboBox.indicator.width + clearComboBox.spacing
-
-        text: clearComboBox.displayText
-        verticalAlignment: Text.AlignVCenter
-        elide: Text.ElideRight
-    }
-
-    indicator: ColorOverlay {
-        anchors.right: clearComboBox.right
-        anchors.rightMargin: clearComboBox.rightPadding
-        anchors.verticalCenter: clearComboBox.verticalCenter
-
-        cached: true
-        width: source.width
-        height: source.height
-
-        source: Image {
-            horizontalAlignment: Qt.AlignRight
-            verticalAlignment: Qt.AlignVCenter
-            source: "image://svgimage-custom-color/caret-down.svg/" + palette.windowText
-            sourceSize.width: Style.accountDropDownCaretSize
-            sourceSize.height: Style.accountDropDownCaretSize
-            Accessible.role: Accessible.PopupMenu
-            Accessible.name: qsTr("Clear status message menu")
-        }
-    }
-
-    popup: Popup {
-        y: clearComboBox.height - Style.normalBorderWidth
-        width: clearComboBox.width
-        implicitHeight: contentItem.implicitHeight
-        padding: Style.normalBorderWidth
-
-        contentItem: ListView {
-            clip: true
-            implicitHeight: contentHeight
-            model: clearComboBox.popup.visible ? clearComboBox.delegateModel : null
-            currentIndex: clearComboBox.highlightedIndex
-
-            ScrollIndicator.vertical: ScrollIndicator { }
-        }
-
-        background: Rectangle {
-            color: palette.toolTipBase
-            border.color: palette.dark
-            radius: Style.slightlyRoundedButtonRadius
-        }
-    }
-
-
-    delegate: ItemDelegate {
-        id: clearStatusDelegate
-        width: clearComboBox.width
-        contentItem: EnforcedPlainTextLabel {
-            text: modelData.display
-            elide: Text.ElideRight
-            verticalAlignment: Text.AlignVCenter
-        }
-        highlighted: clearComboBox.highlightedIndex === index
-    }
-}